package com.job.springsea.work0712;

/**
 * @author 于春海
 * @version 1.0
 * @since 2022-07-12 19:37:24
 */
public class TigerFactory {
    public static AttackAbility getAttack(String number){
        if(number.equals("1")){
            return new AttackA();
        }else if(number.equals("2")){
            return new AttackB();
        }else if(number.equals("3")){
            return new AttackC();
        }else {
            AttackAbility attackAbility1=new AttackAbility(){

                @Override
                public void attackability() {
                    System.out.println("防守!");
                }
            };
            return attackAbility1;
        }
    }


}